<link rel="stylesheet" href="css/contact_vttai.css" type="text/css" />
<link rel="stylesheet" href="css/text_css_hqk.css" type="text/css" />
<?php
	//echo $id_proj = $_GET['id'];
	include_once('libs/htdu_core.php');
	$exe_mysql = new execute_mysql_query();
	@$id_proj = $_GET['id'];
	$result = $exe_mysql->execute("select * from node where id = $id_proj",0);
	$row = mysql_fetch_array($result);
	
	echo '<div class="name_proj">'.$row['title_'.$LOCAL].'</div>';
	echo '<div class="content_proj">'.$row['content_'.$LOCAL].'</div>';
?>

<?php
	/*Hàm giới hạn chữ khi hiển thị*/
	function cut($str, $len) 
	{
		$str = trim($str);
		if (strlen($str) <= $len) return $str;
		$str = substr($str, 0, $len);
		if ($str != "") {
			if (!substr_count($str, " ")) return $str." ...";
			while (strlen($str) && ($str[strlen($str) - 1] != " ")) $str = substr($str, 0, -1);
			$str = substr($str, 0, -1)." ...";
		}
		return $str;
	}	
?>

<div class="du_an_lien_quan">
	<p class="group-line" style="width:98%">
    	<span class="group-title"><?php echo $MULTI_LANG->get_word_by_key('other_project'); ?></span>
	</p>
	<?php		
		$result2 = $exe_mysql->execute("select * from node where id <> $id_proj and id_type = 4 order by date desc",0);
		while($row = mysql_fetch_array($result2))
		{
			$func = new global_function();
			$str = $func->remove_sign($row["title_".$LOCAL]);
			//$sqldate = strtotime($row['date']);
			//$date = date('d/m/Y', $sqldate);
			echo '<div class="list_lien_quan">';
				echo '<div class="hinh">'.'<a href="chi-tiet-du-an-'.$str.'-'.$row['id'].'.html" ><img src="'.$row['img'].'" width="155px" height="155px" alt="'.$row['title_'.$LOCAL].'" title="'.$row['title_'.$LOCAL].'" /></a>'.'</div>';
				echo '<div class="xem_tiep">'.'<a href="chi-tiet-du-an-'.$str.'-'.$row['id'].'.html" >'.cut($row['title_'.$LOCAL],25).'</a>'.'</div>';
			echo '</div>';
		}
	?>
</div>